Skip to content

Add mangling for pack indexing types and expressions (C++26)#198

Open
cor3ntin wants to merge 1 commit intoitanium-cxx-abi:mainfrom
cor3ntin:pack_indexing
Open

Add mangling for pack indexing types and expressions (C++26)#198
cor3ntin wants to merge 1 commit intoitanium-cxx-abi:mainfrom
cor3ntin:pack_indexing

Conversation

@cor3ntin
Copy link
Copy Markdown

This proposes

<type> ::= Dy <type> <index expression>                   # pack indexing type
<expression> ::= sy <template-param> <index expression>   # pack indexing expression
<expression> ::= sy <function-param> <index expression>   # pack indexing expression

And roughly mirrors sizeof....
The case of a partially substituted pack of type is not handled.

This proposes
```
<type> ::= Dy <type> <index expression>                   # pack indexing type
<expression> ::= sy <template-param> <index expression>   # pack indexing expression
<expression> ::= sy <function-param> <index expression>   # pack indexing expression
```

And roughly mirrors `sizeof...`.
The case of a partially substituted pack of type is not handled.
@cor3ntin
Copy link
Copy Markdown
Author

Related issue #175

@jicama
Copy link
Copy Markdown
Contributor

jicama commented Apr 3, 2026

This proposes

<type> ::= Dy <type> <index expression>                   # pack indexing type
<expression> ::= sy <template-param> <index expression>   # pack indexing expression
<expression> ::= sy <function-param> <index expression>   # pack indexing expression

And roughly mirrors sizeof.... The case of a partially substituted pack of type is not handled.

How about using ?y J <template-arg>* E <index expression> for that case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants